package com.engine4cloud.tdf.education.dto.update;

import com.engine4cloud.tdf.common.core.constant.enums.EducationProgressTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 课程
 *
 * @author wenjie
 * @date 2024-07-30 14:56:55
 */
@Data
@Schema(description = "课程")
public class EduCourseUpdateDTO implements Serializable {

    /**
     * 主键
     */
    @Schema(description = "主键")
    @NotNull(message = "主键不能为空")
    private Long id;

    /**
     * 课程名称
     */
    @Schema(description = "课程名称", example = "素质教育")
    @NotBlank(message = "课程名称不能为空")
    private String name;

    /**
     * 是否必修
     */
    @Schema(description = "是否必修", example = "1")
    @NotNull(message = "是否必修不能为空")
    private String isRequired;

    /**
     * 课时
     */
    @Schema(description = "课时", example = "20.5")
    @NotNull(message = "课时不能为空")
    private BigDecimal periods;

    /**
     * 课程开始时间
     */
    @Schema(description = "课程开始时间", example = "2024-07-01 00:00:00")
    @NotNull(message = "课程开始时间不能为空")
    private LocalDateTime startTime;

    /**
     * 课程结束时间
     */
    @Schema(description = "课程结束时间", example = "2025-07-01 00:00:00")
    @NotNull(message = "课程结束时间不能为空")
    private LocalDateTime endTime;

    /**
     * 授课类型
     */
    @Schema(description = "授课类型", example = "ONLINE")
    @NotNull(message = "授课类型不能为空")
    private EducationProgressTypeEnum progressType;

    /**
     * 教育形式
     */
    @Schema(description = "教育形式", example = "01")
    @NotBlank(message = "教育形式不能为空")
    private String format;

    /**
     * 封面地址
     */
    @Schema(description = "封面地址")
    private String coverUrl;

    /**
     * 课程描述
     */
    @Schema(description = "课程描述")
    private String describe;


    @Schema(description = "资源描述", example = "[\"121212121\",\"78781515215\",\"565962322515145\",\"484581251212\"]")
    @NotEmpty(message = "教学资源不能为空")
    private List<String> resourceList;

    /**
     * 学组编号
     */
    @Schema(description = "学组编号", example = "[\"121212121\",\"78781515215\"]")
    @NotEmpty(message = "学组编号不能为空")
    private List<String> groupList;
}